-
Notifications
You must be signed in to change notification settings - Fork 527
Disable AMP by default on CPU #9218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Merging the PR. The failed tests is irrelevant to the change in this PR. |
Maybe wait for @ysiraichi 's comment before merging. : ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix. I think it would be nice to also have:
- A warning, so that the user knows AMP is not being used
- A test, checking that we don't error and AMP is not being used
I added the warning. |
There are already some benchmark tests here: https://github.com/pytorch/xla/tree/master/test/benchmarks |
Great! working on it! |
Resolves #9119.
The benchmarks in pytorch/xla does not work on CPU because of it is set to use AMP by default, which supports cuda and tpu only, but not cpus.
This PR fixes this issue by disable AMP by default when the accelerator is set to cpu.